package com.briup.day06;

/**
 * 地址值传递
 * @author lining
 * @date 2024/1/15 9:49
 */
public class TestStudent2 {
    public static void change(Student s){//s = Student@123ab
        s.id = 2;
        //第一行输出：
        System.out.println(s.id); //2
    }
    public static void main(String[] args) {
        Student s = new Student();
        // s= Student@123ab
        //对属性进行赋值
        s.id = 1;
        s.name = "jack";
        change(s);
        System.out.println(s.id);//第二行输出
        //  2 2 22
    }
}
